#pragma once
#include "node.h"
#include "Instance.h"
#include "Transform.h"
#include <list>

class CGroup :
	public CNode
{
private:
	int NumChildren;

	//CNode *Child;
	list<CNode*> theChildren;

	CInstance* theInstance;
	CTransform* theTransform;

public:
	CGroup(void);
	~CGroup(void);
	void Draw(void);
	void SetInstance(CInstance* theInstance);
	void AddChild(CTransform* aNewTransform, CGroup* aNewGroup, CInstance* aNewInstance);

	void SetTransform(CTransform* aNewTransform);
	void ApplyTranslate( const float dx, const float dy, const float dz );
	void ApplyRotate(const float angle, const float dx, const float dy, const float dz);
	void ApplyScale(const float dx, const float dy, const float dz);

	//Get top left corner of the group
	Vector3D GetTopLeft(void);
	//Get bottom right corner of the group
	Vector3D GetBottomRight(void);

	//Set colour of the instance
	void SetColor(const float red, const float green, const float blue);
};
